package com.iflysse.util;

import org.apache.log4j.Logger;

import java.util.Map;

/**
 * 日志工具类
 */
public class LogWriterUtil {
    /**
     * 写日志
     * @param log 日志对象
     * @param data 写入数据
     */
    public static void write(Logger log, Map<String,Object> data){
        StringBuffer message= new StringBuffer();

        data.forEach((key,value)->{
            message .append( key +":"+value+",");
        });

        log.info(message.substring(0,message.length()-1));
    }
}
